package com.sangmo.fts.user.model;

import com.sangmo.boot.framework.data.entity.general.AuditEntity;
import com.sangmo.boot.framework.data.json.meta.ExtView;
import com.sangmo.boot.framework.plugin.dataview.def.meta.DataField;
import com.sangmo.boot.framework.plugin.dataview.def.meta.DataView;
import com.sangmo.fts.common.IConstants;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;

@Entity
@Table(name = "account")
@ExtView
public class Account extends AuditEntity {

    @DataField(value = IConstants.DATA_TYPE.LONG, required = true, index = true)
    private Long userId;

    /** 初始资金 **/
    @DataField(value = IConstants.DATA_TYPE.DECIMAL_POSITIVE_MONEY, required = true)
    private BigDecimal initialFunds;

    /** 可用资金 **/
    @DataField(value = IConstants.DATA_TYPE.DECIMAL_POSITIVE_MONEY, required = true)
    private BigDecimal disposableFunds;

    /** 存货价值 **/
    @DataField(value = IConstants.DATA_TYPE.DECIMAL_POSITIVE_MONEY, required = true)
    private BigDecimal inventoryPrice;

    private String state;

    private String remark;

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public BigDecimal getInitialFunds() {
        return initialFunds;
    }

    public void setInitialFunds(BigDecimal initialFunds) {
        this.initialFunds = initialFunds;
    }

    public BigDecimal getDisposableFunds() {
        return disposableFunds;
    }

    public void setDisposableFunds(BigDecimal disposableFunds) {
        this.disposableFunds = disposableFunds;
    }

    public BigDecimal getInventoryPrice() {
        return inventoryPrice;
    }

    public void setInventoryPrice(BigDecimal inventoryPrice) {
        this.inventoryPrice = inventoryPrice;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
